package com.tianji.learning.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor(staticName = "of")
public class AuditResult {
    private String url;
    private String text;
    private String scene;
    private String suggestion;
    private String label;
    private String reason;

    public AuditResult(String scene, String suggestion) {
        this.scene = scene;
        this.suggestion = suggestion;
    }

    public AuditResult(String suggestion) {
        this.suggestion = suggestion;
    }

    public static AuditResult of(String suggestion) {
        return new AuditResult(suggestion);
    }

    public static AuditResult of(String scene, String suggestion) {
        return new AuditResult(scene, suggestion);
    }

    public boolean isBlock() {
        return "block".equals(suggestion);
    }

    public boolean isReview() {
        return "review".equals(suggestion);
    }

    public boolean isPass() {
        return "pass".equals(suggestion);
    }
}